<?php require("inc/common.inc.php");?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta content="width=device-width,user-scalable=no,initial-scale=1,maximum-scale=1" name="viewport">
<?php
$id=intval($id);
if($id==0){
    $sqlsel="select fid from mx_vpp_articleclass order by list asc,fid desc limit 1";
}
else{
    $sqlsel="select * from mx_vpp_articleclass where fid='$id' limit 1";
}
$rs=$db->excu($sqlsel);
if ($db->num_rows($rs)<=0){
	$fun->popmassage("非法操作，系统将自动返回上一页!","","popback");
	exit();
}
$nei_classdb=$db->fetch_array($rs);
$web_title="$nei_classdb[name]";
$web_title2="$nei_classdb[name]";
$smalldao="&nbsp;&gt;&gt;&nbsp;$nei_classdb[name]";
$fupid=$nei_classdb["fid"];
if ($nei_classdb["classtype"]==3){
	  echo "<meta http-equiv=\"refresh\" content=\"0;URL=$nei_classdb[jumpurl]\">";
	  exit();
}

  if ($nei_classdb["classtype"]==2 and $nei_classdb["sons"]==0){
		$query="select * from mx_vpp_article where fid='{$nei_classdb[fid]}' and yz='1' order by istop desc, orderid asc, posttime desc, aid desc limit 1";
		$newsdb=$db->getinfo($query);
		if (is_array($newsdb)){
			  if ($newsdb["iframeurl"]==1){
				  echo "<meta http-equiv=\"refresh\" content=\"0;URL=$newsdb[jumpurl]\">";
				  exit();
			  }
		}
	}
$fupid=$db->get_f_aid($nei_classdb["fid"]);
if ($fupid==24){
	$web_title="微分享-".$web_title;
}
?>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><?php echo $web_title;?></title>
<meta name="searchtitle" content="<?php echo $web_title2.$webdb['metakeywords'];?>">
<meta name="description" content="<?php echo $web_title2.$webdb['webdsc'];?>">
<meta name="keywords" content="<?php echo $web_title2.$webdb['metakeywords'];?>">
</head>
<body>
<?php
require("w_head.php");

//判断是否有下级菜单
if($nei_classdb["sons"]>0){
	require("w_articleclass.php");
}
else{
	//加载分类信息
	require("w_articlelist.php");
}
?>
<?php require("w_foot.php")?>